<%@ Control Language="C#" Inherits="SoftwareMonkeys.Scriptech.Scripts.BaseScript" %>
<%@ Import namespace="SoftwareMonkeys.Scriptech.Ftp" %>
<%@ Import namespace="SoftwareMonkeys.Scriptech.Entities" %>
<%@ Import namespace="SoftwareMonkeys.Scriptech.Business" %>
<%@ Import namespace="SoftwareMonkeys.Scriptech.Web" %>
<%@ Import namespace="SoftwareMonkeys.Scriptech.Scripts" %>
<script runat="server">
protected FtpServer[] Servers = new FtpServer[]{};

private void Page_Load(object sender, EventArgs e)
{
	Servers = IndexStrategy.New<FtpServer>().Index<FtpServer>();
}
</script>
<h1>FTP Servers</h1>
<hr/>
<a href='<%= Request.ApplicationPath %>'>Home</a>
<hr/>
<p><a href='<%= ScriptPath.GetUrl("CreateFtpServer.ascx") %>'>New FTP Server &raquo;</a></p>
<p>The following FTP servers have been configured.</p>
<% if (Servers.Length == 0){ %>
No FTP servers configured.
<% } %>
<table width="100%">
<% foreach (FtpServer server in Servers){ %>
<tr>
<td>
	<%= server.Name %>
</td>
<td>
	<a href='<%= ScriptPath.GetUrl("EditFtpServer.ascx", "FtpServerID=" + server.ID.ToString()) %>'>Edit</a>
</td>
</tr>
<% } %>
</table>